package com.victorywang.RetrofitWebService.request;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.Root;

import java.util.Iterator;
import java.util.Map;


@Root(name = "AssetMaterialInfo", strict = false)
@Namespace(reference = "http://tempuri.org/")
public class RequestModel {
    @Element(name = "date", required = false)
    public String date;
    @Element(name = "page", required = false)
    public int page;

    @Element(name = "sleep", required = false)
    public int sleep;

//    public RequestModel(String date, int page) {
//        this.date = date;
//        this.page = page;
//    }

    public RequestModel(int isleep){
        this.sleep = isleep;
    }

    public RequestModel(Map<String,String> mapValues){
        Iterator<Map.Entry<String,String>> iterator = mapValues.entrySet().iterator();
        while (iterator.hasNext()){
            String sKey =  iterator.next().getKey();
            String sValue = iterator.next().getValue();

        }
    }
}
